<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<table>
		<tr>
		    <th>编号</th>
			<th>姓名</th>
			<th>学号</th>
			<th>出生日期</th>
			<th>性别</th>
			<th>政治面貌</th>
			<th>操作</th>
		</tr>
		<%--使用JSTL来迭代数据 --%>
		<%--使用EL表达式提取数据--%>
		<c:forEach items="${pageBean.datas }" var="p" varStatus="status">
			<tr>
				<td>${status.count }</td>
				<td><a id="pname" href="javascript:void(0)" onclick="checkInfo(${p.stuNo})">${p.name}</a></td>
				<td>${p.stuNo }</td>
				<td>${p.birthday }</td>
				
				<td><%--性别判断--%>
				<c:if test="${p.sex ==1}">男</c:if>
				<c:if test="${p.sex ==0}">女	</c:if>
				</td>
				
				<td><%--政治面貌判断--%>
				<c:if test="${p.polity ==1}">党员</c:if>
				<c:if test="${p.polity ==2}">团员</c:if>
				<c:if test="${p.polity ==3}">无党派</c:if>
				<c:if test="${p.polity ==4}">其他</c:if>
				</td>
				<td><span class="iconfont icon-xiugai"
				onclick="editStudent(${p.stuNo})"></span> <span
				class="iconfont icon-shanchu" onclick="deleteStudent(${p.stuNo})"></span>
			</td>
			</tr>
		</c:forEach>
	</table>
<br>
<br>	
<div style="text-align: center;font-size:18px;">
<c:if test="${pageBean.hasPrevious}">
	<a href="javascript:void(0)" onclick="go(1)">首页</a>
	<a href="javascript:void(0)" onclick="go(${pageBean.pageNow-1})">上一页</a>
</c:if>
<span>${pageBean.pageNow }/${pageBean.pages }</span>
<c:if test="${pageBean.hasNext}">
	<a href="javascript:void(0)" onclick="go(${pageBean.pageNow+1})">下一页</a>
	<a href="javascript:void(0)" onclick="go(${pageBean.pages})">尾页</a>
</c:if>
</div>
